In conventional network stacks, when an application layer within the network stack initiates creation of a segment of a packet, such as a SIP Invite packet (or any other type of packet), the application layer creates that segment in application user memory. The application layer then executes a socket call to transfer the segment of the packet to another layer in the network stack, such as the network stack's user layer. The network stack's user layer performs a copy operation to copy the segment of the packet from the application layer to the user layer. To transfer the segment of the packet to kernel memory, the user layer executes another copy operation to copy the segment of the packet into kernel memory.
Other layers within the network stack create various packet segments for the invite packet as well. For example, when the user layer creates another packet segment, consisting of packet header data, the user layer initially creates the packet segment in the user layer. Again, the user layer executes a copy operation to transfer the packet segment into kernel memory. As other layers in the network stack create additional packet segments, each packet segment is initially created at a respective layer in kernel memory. In addition, there is another copy to move the fully formed packet into a kernel memory area that is accessible by a hardware device that is responsible for transmitting the packet.